package com.stone.front.order.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.stone.back.order.entity.BfOrder;
import com.stone.back.order.entity.BfOrderInfo;
import com.stone.front.order.dao.IOrderFrontDao;

/**
 * 菜品管理
 * @author Stone P
 *
 */
@Service
public class OrderFrontService implements IOrderFrontService {
	@Autowired
	private IOrderFrontDao orderFrontDao;
	/**
	 * 保存订单信
	 * @param order		订单信息
	 * @return
	 */
	@Override
	public String addOrder(BfOrder order) {
		String orderId = orderFrontDao.addOrder(order);
		return orderId;
	}
	
	/**
	 * 保存订单菜品信息
	 * @param orderInfo		订单详情
	 * @return
	 */
	@Override
	public Integer addOrderInfo(BfOrderInfo orderInfo) {
		Integer orderDishId = orderFrontDao.addOrderInfo(orderInfo);
		return orderDishId;
	}
}
